import 'package:flutter/material.dart';
import 'package:flutterhello/pages/chat_detail/chat_detail.dart';
import 'package:flutterhello/pages/chat_detail/test_page.dart';
import 'package:flutterhello/pages/four/widget/create_team.dart';
import 'package:flutterhello/pages/four/widget/my_create_act.dart';
import 'package:flutterhello/pages/four/widget/my_create_team.dart';
import 'package:flutterhello/pages/four/widget/my_join_act.dart';
import 'package:flutterhello/pages/four/widget/my_join_team.dart';
import 'package:flutterhello/pages/four/widget/revise_info.dart';
import 'package:flutterhello/pages/four/widget/setting.dart';
import 'package:flutterhello/pages/new_team/new_team.dart';
import 'package:flutterhello/pages/notice/notice.dart';
import 'package:flutterhello/pages/one/widgets/act_detail.dart';
import 'package:flutterhello/pages/one/widgets/act_team_list.dart';
import 'package:flutterhello/pages/one/widgets/add_activite.dart';
import 'package:flutterhello/pages/one/widgets/join_act.dart';
import 'package:flutterhello/pages/two/widget/add_team_user.dart';
import 'package:flutterhello/pages/two/widget/inv_detail.dart';
import 'package:flutterhello/sp.dart';
import 'my_app.dart';
import 'pages/login/login.dart';
import 'pages/login/sign.dart';
import 'pages/activity/activity.dart';
import 'package:get/get.dart';
import 'package:flutter/services.dart';
import 'dart:io';

void main() {
  runApp(
    GetMaterialApp(
      debugShowCheckedModeBanner: false,
      home: SpPage(),
      initialRoute: "/sp",
      theme: ThemeData(
        primaryColor: Colors.blueGrey,
      ),
      getPages: [
        GetPage(name: "/", page: () => MyApp()),
        GetPage(name: '/sp', page: () => SpPage()),
        GetPage(name: "/team", page: () => Team()),
        GetPage(name: "/activity", page: () => Activity()),
        GetPage(name: '/inv_detail', page: () => InvDetail()), //邀请详情页面
        GetPage(name: '/act_detail', page: () => ActDetail()),
        GetPage(name: '/chat_detail', page: () => ChatDetail()),
        GetPage(name: '/test_page', page: () => TestPage()),
        GetPage(name: '/login_page', page: () => LoginPage()),
        GetPage(name: '/sign_page', page: () => SignPage()),
        GetPage(name: '/add_team_user', page: () => AddTeamUserPage()),
        GetPage(name: '/add_act', page: () => AddActPage()),
        GetPage(name: '/join_act', page: () => JoinActPage()),
        GetPage(name: '/act_team_list', page: () => ActTeamListPage()),
        GetPage(name: '/my_join_team', page: () => MyJoinTeamPage()),
        GetPage(name: '/my_create_team', page: () => MyCreateTeamPage()),
        GetPage(name: '/my_join_act', page: () => MyJoinActPage()),
        GetPage(name: '/my_create_act', page: () => MyCreateActPage()),
        GetPage(name: '/setting', page: () => SettingPage()),
        GetPage(name: '/create_team', page: () => CreateTeamPage()),
        GetPage(name: '/notice_page', page: () => NoticePage()),
        GetPage(name: '/revise_info', page: () => ReviseInfoPage()),
      ],
    ),
  );
  if (Platform.isAndroid) {
    //设置Android头部的导航栏透明
    SystemUiOverlayStyle systemUiOverlayStyle =
        SystemUiOverlayStyle(statusBarColor: Colors.transparent);
    SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
  }
}
